<?php
require_once(__DIR__."/libs/db.inc.php");

class AccountDbSet extends \db\DbSet {
    static $DB_PRIMARY="Id";
    
}

$db = \db\Database::create();
$accounts = $db->dbset("Account");

/*
for($i=0;$i<20;$i++){
    $accounts->Username = "yiy" . rand(1000000,999999999);
    $accounts->Password = "222";
    $accounts->add();
    $accounts->Id=null;
}*/
/*
$count = $accounts->where("`Password`=?","333")->query_count();

$accounts->take(10);

var_dump($accounts->to_json());

foreach($accounts as $value){
    var_dump($value);
}*/

$accounts->load(35);
var_dump($accounts->to_json());
$accounts->Password="abc";
$accounts->save();

$db->close();



